package jp.co.takapy.baycity.server.model;

import java.io.Serializable;

import com.google.appengine.api.datastore.Key;

import org.slim3.datastore.Attribute;
import org.slim3.datastore.Model;

@Model(schemaVersion = 1)
public class TimeTableMst implements Serializable {

    private static final long serialVersionUID = 1L;

    @Attribute(primaryKey = true)
    private Key key;

    @Attribute(version = true)
    private Long version;

    private int stationId;

    private int hour;

    private int minutes;

    private int horidayFlg;

    private int specialFlg;

    private int updownFlg;

    private String specialStr;

    /**
     * Returns the key.
     *
     * @return the key
     */
    public Key getKey() {
        return key;
    }

    /**
     * Sets the key.
     *
     * @param key
     *            the key
     */
    public void setKey(Key key) {
        this.key = key;
    }

    /**
     * Returns the version.
     *
     * @return the version
     */
    public Long getVersion() {
        return version;
    }

    /**
     * Sets the version.
     *
     * @param version
     *            the version
     */
    public void setVersion(Long version) {
        this.version = version;
    }


    /**
     * @return stationId
     */
    public int getStationId() {
        return stationId;
    }

    /**
     * @param stationId セットする stationId
     */
    public void setStationId(int stationId) {
        this.stationId = stationId;
    }

    /**
     * @return hour
     */
    public int getHour() {
        return hour;
    }

    /**
     * @param hour セットする hour
     */
    public void setHour(int hour) {
        this.hour = hour;
    }

    /**
     * @return minutes
     */
    public int getMinutes() {
        return minutes;
    }

    /**
     * @param minutes セットする minutes
     */
    public void setMinutes(int minutes) {
        this.minutes = minutes;
    }

    /**
     * @return horidayFlg
     */
    public int getHoridayFlg() {
        return horidayFlg;
    }

    /**
     * @param horidayFlg セットする horidayFlg
     */
    public void setHoridayFlg(int horidayFlg) {
        this.horidayFlg = horidayFlg;
    }

    /**
     * @return specialFlg
     */
    public int getSpecialFlg() {
        return specialFlg;
    }

    /**
     * @param specialFlg セットする specialFlg
     */
    public void setSpecialFlg(int specialFlg) {
        this.specialFlg = specialFlg;
    }

    /**
     * @return updownFlg
     */
    public int getUpdownFlg() {
        return updownFlg;
    }

    /**
     * @param updownFlg セットする updownFlg
     */
    public void setUpdownFlg(int updownFlg) {
        this.updownFlg = updownFlg;
    }

    /**
     * @return specialStr
     */
    public String getSpecialStr() {
        return specialStr;
    }

    /**
     * @param specialStr セットする specialStr
     */
    public void setSpecialStr(String specialStr) {
        this.specialStr = specialStr;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((key == null) ? 0 : key.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        TimeTableMst other = (TimeTableMst) obj;
        if (key == null) {
            if (other.key != null) {
                return false;
            }
        } else if (!key.equals(other.key)) {
            return false;
        }
        return true;
    }
}
